package com.zhyl.demo.mapper;

import com.zhyl.demo.entity.Doctor;
import org.apache.ibatis.annotations.Mapper;


import javax.print.Doc;
import java.util.ArrayList;
import java.util.List;


/**
 * @author yang3
 */
@Mapper
public interface DoctorMapper {
    /**
     * 得到当前医生信息
     * @param docId
     * @return
     */
    Doctor docInfo(Integer docId);

    /**
     * 获取所有医生列表
     * @param specialty
     * @return
     */
    ArrayList<Doctor> docList(String specialty);

    /**
     * 通过登录id获取doctor信息
     * @param userDoc
     * @return
     */
    Doctor getDoc(Integer userDoc);

    /**
     * 获取所有医生列表
     * @return
     */
    ArrayList<Doctor> getAllDoc();

    /**
     * 按科室查找医生
     * @param sname
     * @return
     */
    ArrayList<Doctor> selectBySpecialty(String sname);

    /**
     * 更新医生信息
     * @param doctor
     * @return
     */
    int updateDocInfo(Doctor doctor);

    Integer deleteDoc(Integer id);

    Integer addDoc(Doctor doctor);

    List<Doctor> getDocByName(String name);

    ArrayList<Doctor> searchDocByName(String specialty, String docName);
}
